using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class Al_StatusMap : EntityTypeConfiguration<Al_Status>
    {
        public Al_StatusMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.name)
                .HasMaxLength(50);

            this.Property(t => t.Code)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("Al_Status");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.name).HasColumnName("name");
            this.Property(t => t.Code).HasColumnName("Code");
        }
    }
}
